package com.作业.第十章作业.Homework04;

/**
 * 作    者 ：吾路巴尼
 * 创建时间 ：2025/2/13-22:29
 */
public class main {
    public static void main(String[] args) {
        CellPhone cellPhone = new CellPhone();
        cellPhone.TestWork(new Computer(){
            @Override
            public double work(double n1, double n2) {
                return n1+n2;
            }
        },10,10);

    }

}

interface Computer {
    double work(double n1,double n2);
}

class CellPhone  {
    public void TestWork(Computer c,double n1,double n2) {
        System.out.println(c.work(n1,n2));;
    }
}